<?php require_once 'header.php';
require_once 'OwnerPage.php';
require_once 'backend/Trends.php';

?>
<fieldset>
<legend>Monthly Order Reports</legend>
<p>Select a month to see a report of that month's earnings summary.</p>
<form method='post'>
	<select name = "Month">
		<option value='January'>January</option>
		<option value='February'>February</option>
		<option value='March'>March</option>
		<option value='April'>April</option>
		<option value='May'>May</option>
		<option value='June'>June</option>
		<option value='July'>July</option>
		<option value='August'>August</option>
		<option value='September'>September</option>
		<option value='October'>October</option>
		<option value='November'>November</option>
		<option value='December'>December</option>
		
	</select>
	<input type="submit" value="Select" name="OrderComplete">
	<br><br>
	<?php 
	if(isset($_POST['OrderComplete']))
	{
		$month = $_POST['Month'];
		$trend = new Trend();
		$trend->getOrdersForMonth($month);
		$_SESSION['Trend']= serialize($trend);
		$set = 1;
		
	}
	else 
	{
		$set = 0;
	}
	?>

</form>
<?php 
if($set == 1)
{
	echo "<iframe src='postChart.php' width='650' height='500'>Loading Iframe...</iframe>";	
}

?>
</fieldset>


</div><!-- End of Page Content -->
<?php require_once 'footer.php';?>